﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LibFriesland_Campina_CRM;

public partial class Popup_PopupDemo : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["account"] == null)
            Response.Redirect("../login.aspx");
        if (!IsPostBack)
        {
            databindManagerAction();
        }
    }

    //Lien ket du lieu
    protected void databindManagerAction()
    {
        string by_manager = Request.QueryString["by_manager"].ToString();
        string by_sup = Request.QueryString["by_sup"].ToString();
        string dateTrackingStr = Request.QueryString["dateTracking"].ToString();
        DateTime dateTracking = Convert.ToDateTime(Thuvien.myConvertStringToShortDate(dateTrackingStr));
        List<BizManagerMonitoring> source = BizManagerMonitoring.getSupMonitoringbyManager(dateTracking, by_sup, by_manager);
        grvManagerAction.DataSource = source;
        grvManagerAction.DataBind();
        if (source.Count == 0)
            pldInfo.Visible = true;
        else
            pldInfo.Visible = false;
    }
    protected void grvManagerAction_Sorting(object sender, GridViewSortEventArgs e)
    {
        
    }
}